fix panic haskell cataloger#2419
Conversation
|
Thanks so much for the contribution @houdini91 ! I'm going to make an issue to track some notes, and add a unit test or two, but we should be able to get this in the next syft release. |
|
@houdini91 would you mind allowing maintainers to edit the PR? I was going to add a unit test and fix the linting error. (If you prefer to add the unit test and fix the linting error yourself, that's fine too :) ) I've attached a patch file of the changes I was about to push. |
|
I don't mind at all. |
|
Thanks @houdini91! I was asking for you to enable contributors to push to the PR, in GitHub settings, not just asking permission generally. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork - would you mind either doing that, or pushing the patch file I attached to my last comment to this branch? Thanks! |
Provided by willmurphyscode Signed-off-by: houdini91 <mdstrauss91@gmail.com>
|
Sorry for the confusion, |
Small fix panic (out of bound) for haskell cataloger,
The issue raises when
stack.yaml.lockusesparseStackPackageEncodingwhen empty string.For example:
https://github.com/EdsonACortese/postgrest/blob/aaa4fbc3703642cea2300715c5b2c7cb8266134a/stack.yaml.lock#L4..
Notice the first does not include a hackage field (causing a panic)
stack.yamlparsesextra-depswith packages that do not include a digest.For example https://github.com/EdsonACortese/postgrest/blob/aaa4fbc3703642cea2300715c5b2c7cb8266134a/stack.yaml
Hope this helps.